package com.xxx.management.web.controller;


import com.xxx.common.base.bo.ListResult;
import com.xxx.management.web.util.R;
import com.xxx.user.api.OrderApi;
import com.xxx.user.dto.OrderGetAllReqDTO;
import com.xxx.user.dto.OrderGetAllResDTO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


@Slf4j
@RestController
@AllArgsConstructor
public class OrderController {

    private final OrderApi orderApi;

    /**
     * 获取订单数据
     */
    @GetMapping("/v1/order/getAll")
    public R<ListResult<OrderGetAllResDTO>> getAll(@SpringQueryMap OrderGetAllReqDTO param) {
        return R.ok(orderApi.getAll(param));
    }

}
